#coding:utf-8
import config

Profiles = []

def getProfileIter():
	return iter(Profiles)

def profileReg(path):
	import os
	import traceback
	for configPath in filter(lambda name:name.endswith(".py"),os.listdir(path)):
		try:
			Profiles.append(config.Config(os.path.join(path,configPath)))
		except(NameError,SyntaxError):
			print traceback.format_exc()
